import Mock from "mockjs";

let getApi = {
  // 二级单位-查询
  "finance-study/api/wx/queryTwoJobs": {
    code: 200,
    data: [
      { twoOrgName: "工商银行", twoOrgNo: "1" },
      { twoOrgName: "工商银行2", twoOrgNo: "2" },
    ],
  },
  // 获取签名
  "finance-study/getjsticket": {
    code: 200,
    data: {
      appId: "123456",
      timestamp: "123456",
      noncestr: "123456",
      signature: "123456",
    },
  },
  // 获取跳转链接
  "finance-study/api/wx/wxPageuserLogin": {
    code: 200,
    msg: "http://192.168.3.26:8080/#/Login?code=123&state=123",
  },
  // 获取token
  "finance-study/api/wx/loginwx": {
    code: 200,
    token: "123",
  },
  // 答题完获取错题列表
  "finance-study/api/answerMain/queryWrongQuestionList": Mock.mock({
    code: 200,
    "data|48": [
      {
        "topicMainId|+1": 1,
        "isTure|1": true,
      },
    ],
  }),
  // 单个错题
  "finance-study/api/answerMain/queryWrongQuestionItem": Mock.mock({
    code: 200,
    data: {
      questionStemType: 1, // 题干类型:1党史;2金融
      topicDescribe: "题目描述",
      topicMainId: 0, // 主键id
      topicOptionsDTOList: [
        // 题目答案选项对象
        {
          topicMainId: 0, // 题目ID
          topicOption: "选项内容1",
          topicOptionsId: 0, // 主键id
          wheAnswer: 0, // 选项是否正确:1是0否
        },
        {
          topicMainId: 0, // 题目ID
          topicOption: "选项内容12",
          topicOptionsId: 0, // 主键id
          wheAnswer: 0, // 选项是否正确:1是0否
        },
      ],
      topicScore: 0, // 题目分值
      topicType: 1, // 类型:1单选;2多选,3判断
    },
  }),
  // 我的收藏
  "finance-study/api/wx/queryCollectionTitle": Mock.mock({
    code: 200,
    "data|10": [
      {
        topicDescribe: "（人民币知识）人民币国际货币符号为（）。",
        "topicType|1-3": 1,
        topicMainId: 1,
      },
    ],
  }),
  // 我的错题
  "finance-study/api/wx/queryWrongTopic": Mock.mock({
    code: 200,
    "data|10": [
      {
        topicDescribe: "（人民币知识）人民币国际货币符号为（）。",
        "topicType|1-3": 1,
        topicMainId: 1,
      },
    ],
  }),
  // 题目详情
  "finance-study/api/wx/queryAnswer": Mock.mock({
    success: true,
    message: "操作成功！",
    code: 200,
    data: {
      topicMainId: 1,
      topicDescribe: "（人民币知识）人民币国际货币符号为（）。",
      questionStemType: 2,
      topicType: 1,
      topicScore: 2,
      topicOptionsDTOList: [
        {
          topicOptionsId: 2556,
          topicMainId: 1,
          topicOption: "CHY",
          wheAnswer: 0,
        },
        {
          topicOptionsId: 2557,
          topicMainId: 1,
          topicOption: "RMB",
          wheAnswer: 0,
        },
        {
          topicOptionsId: 2558,
          topicMainId: 1,
          topicOption: "CNY",
          wheAnswer: 1,
        },
        {
          topicOptionsId: 2559,
          topicMainId: 1,
          topicOption: "CMB",
          wheAnswer: 0,
        },
      ],
    },
    timestamp: 1651829371944,
  }),
};

export default getApi;
